﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using System.Data.Objects;
using System.Data.Entity;

namespace $safeprojectname$.Repositories
{
    public interface IRepository<T> where T : class
    {
        //T Find(int id);
        T Find(Expression<Func<T, bool>> where);
        IEnumerable<T> FindList(Expression<Func<T, bool>> where);
        IEnumerable<T> FindAll();
        void Add(T entity);
        void Attach(T entity);
        void Update(T entity);
        void Delete(T entity);
        T Create(T entity);
        int Count();
        int Count(Expression<Func<T, bool>> where);
        void SaveChanges();
    }
}
